<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>YmsgIRC: ChatRenderer.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YmsgIRC
   </div>
   <div id="projectbrief">Program enabling YMSG clients to use IRC</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_chat_renderer_8h.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">ChatRenderer.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Yahoo-chat text-formatting functions.  
<a href="#details">More...</a></p>
<div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h__dep__incl.jpg" border="0" usemap="#_chat_renderer_8hdep" alt=""/></div>
<map name="_chat_renderer_8hdep" id="_chat_renderer_8hdep">
<area shape="rect" id="node3" href="common_8h.html" title="Commonly used functions and debugging." alt="" coords="125,80,208,107"/><area shape="rect" id="node5" href="channel_8h.html" title="A channel/chatroom implementation." alt="" coords="5,155,83,181"/><area shape="rect" id="node7" href="network_8h.html" title="Provides a base for an Instant Messaging network implementation." alt="" coords="41,229,119,256"/><area shape="rect" id="node12" href="license__disp_8h.html" title="Provides program license information." alt="" coords="159,155,264,181"/><area shape="rect" id="node14" href="main_8h.html" title="Provides main includes and initializes networking code." alt="" coords="227,229,288,256"/><area shape="rect" id="node9" href="_i_r_c_8h.html" title="Classes and functions useful for using Internet Relay Chat." alt="" coords="53,304,107,331"/></map>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a61619b0d85f26ed36bd14c4fefbc4f72"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72">RendererText_StripText</a> (const string &amp;s)</td></tr>
<tr class="memdesc:a61619b0d85f26ed36bd14c4fefbc4f72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Strips yahoo text formatting from a string.  <a href="#a61619b0d85f26ed36bd14c4fefbc4f72"></a><br/></td></tr>
<tr class="memitem:af06d96fd37355e90b1442a086ed24aec"><td class="memItemLeft" align="right" valign="top">DLLIMPORT void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#af06d96fd37355e90b1442a086ed24aec">RendererText_Create</a> (const char *s)</td></tr>
<tr class="memdesc:af06d96fd37355e90b1442a086ed24aec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a RendererText object from a string for manipulation by ChatRenderer.  <a href="#af06d96fd37355e90b1442a086ed24aec"></a><br/></td></tr>
<tr class="memitem:aa0eda33c01059b56b84add0060d424e7"><td class="memItemLeft" align="right" valign="top">DLLIMPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#aa0eda33c01059b56b84add0060d424e7">RendererText_Dispose</a> (void *pRTextVoid)</td></tr>
<tr class="memdesc:aa0eda33c01059b56b84add0060d424e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free a RendererText object from memory.  <a href="#aa0eda33c01059b56b84add0060d424e7"></a><br/></td></tr>
<tr class="memitem:a4e32ec37bc35fb42ec98d594a8265c89"><td class="memItemLeft" align="right" valign="top">DLLIMPORT const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#a4e32ec37bc35fb42ec98d594a8265c89">RendererText_Retrieve</a> (void *pRTextVoid)</td></tr>
<tr class="memdesc:a4e32ec37bc35fb42ec98d594a8265c89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieve a C string from a RendererText object.  <a href="#a4e32ec37bc35fb42ec98d594a8265c89"></a><br/></td></tr>
<tr class="memitem:aa832b4d5bec023fd420aada507373979"><td class="memItemLeft" align="right" valign="top">DLLIMPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#aa832b4d5bec023fd420aada507373979">RendererText_YFormatHTML</a> (void *pRTextVoid)</td></tr>
<tr class="memdesc:aa832b4d5bec023fd420aada507373979"><td class="mdescLeft">&#160;</td><td class="mdescRight">Render yahoo text formatting into HTML format.  <a href="#aa832b4d5bec023fd420aada507373979"></a><br/></td></tr>
<tr class="memitem:a16e70a5af203d8270f617c4e550f71cf"><td class="memItemLeft" align="right" valign="top">DLLIMPORT int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_chat_renderer_8h.html#a16e70a5af203d8270f617c4e550f71cf">RendererText_HTMLStripFormatting</a> (void *pRTextVoid)</td></tr>
<tr class="memdesc:a16e70a5af203d8270f617c4e550f71cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Strip HTML formatting leaving plain text.  <a href="#a16e70a5af203d8270f617c4e550f71cf"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Yahoo-chat text-formatting functions. </p>
<p>Supplies functions useful to this program for manipulating Yahoo text formats.</p>
<p>The internal RendererText class-object contains multiple useful methods and is required by most ChatRenderer functions. The object takes the form of an extension of a string-class; creation and retrieval can be seen as analogues to casting.</p>
<p>Most of the functionality is achieved through ChatRenderer.dll ChatRenderer.dll was originally written for the Yahsmosis chat client project to handle formatting. Many functions are implemented in ChatRenderer that are not imported here. This header should be linked either to the original source or using the included ChatRenderer.lib file.</p>
<p>You may view its source code here: <a href="http://code.google.com/p/yahsmosis/source/browse/trunk/Source/Renderer">http://code.google.com/p/yahsmosis/source/browse/trunk/Source/Renderer</a> Or here: <a href="http://yahsmosis.googlecode.com/svn/trunk/Source/Renderer/">http://yahsmosis.googlecode.com/svn/trunk/Source/Renderer/</a> </p>
<dl class="section author"><dt>Author:</dt><dd>crashenator (crashenator -at- gmail.com) </dd></dl>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="af06d96fd37355e90b1442a086ed24aec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DLLIMPORT void* RendererText_Create </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a RendererText object from a string for manipulation by ChatRenderer. </p>
<p>Creates a heap RendererText class-object from a string, to be used by ChatRenderer. this class-object contains multiple useful methods (internal to ChatRenderer) and is required by most ChatRenderer functions. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>C string of text (possibly containing Yahoo formatting) to be manipulated </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">void*</td><td>Success: a pointer to a newly-created RendererText object. </td></tr>
    <tr><td class="paramname">NULL</td><td>Failure: a RendererText object could not be created. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_af06d96fd37355e90b1442a086ed24aec_icgraph.jpg" border="0" usemap="#_chat_renderer_8h_af06d96fd37355e90b1442a086ed24aec_icgraph" alt=""/></div>
<map name="_chat_renderer_8h_af06d96fd37355e90b1442a086ed24aec_icgraph" id="_chat_renderer_8h_af06d96fd37355e90b1442a086ed24aec_icgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72" title="Strips yahoo text formatting from a string." alt="" coords="198,5,357,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa0eda33c01059b56b84add0060d424e7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DLLIMPORT int RendererText_Dispose </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>pRTextVoid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free a RendererText object from memory. </p>
<p>Note: pRTextVoid is marked as output because of memory modification only. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pRTextVoid</td><td>pointer to a RendererText object in heap memory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>Success: the object was released. </td></tr>
    <tr><td class="paramname">0</td><td>Failure: pRTextVoid was invalid. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_aa0eda33c01059b56b84add0060d424e7_icgraph.jpg" border="0" usemap="#_chat_renderer_8h_aa0eda33c01059b56b84add0060d424e7_icgraph" alt=""/></div>
<map name="_chat_renderer_8h_aa0eda33c01059b56b84add0060d424e7_icgraph" id="_chat_renderer_8h_aa0eda33c01059b56b84add0060d424e7_icgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72" title="Strips yahoo text formatting from a string." alt="" coords="209,5,367,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a16e70a5af203d8270f617c4e550f71cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DLLIMPORT int RendererText_HTMLStripFormatting </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>pRTextVoid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Strip HTML formatting leaving plain text. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pRTextVoid</td><td>pointer to a RendererText object in heap memory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>Success: HTML was successfully stripped from the RendererText contents. </td></tr>
    <tr><td class="paramname">0</td><td>Failure: pRTextVoid was invalid. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_a16e70a5af203d8270f617c4e550f71cf_icgraph.jpg" border="0" usemap="#_chat_renderer_8h_a16e70a5af203d8270f617c4e550f71cf_icgraph" alt=""/></div>
<map name="_chat_renderer_8h_a16e70a5af203d8270f617c4e550f71cf_icgraph" id="_chat_renderer_8h_a16e70a5af203d8270f617c4e550f71cf_icgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72" title="Strips yahoo text formatting from a string." alt="" coords="283,5,442,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4e32ec37bc35fb42ec98d594a8265c89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DLLIMPORT const char* RendererText_Retrieve </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>pRTextVoid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieve a C string from a RendererText object. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pRTextVoid</td><td>pointer to a RendererText object in heap memory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">const char*</td><td>Success: C string created on the heap from contents of RendererText </td></tr>
    <tr><td class="paramname">NULL</td><td>Failure: pRTextVoid was invalid or internal conversion failed. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_a4e32ec37bc35fb42ec98d594a8265c89_icgraph.jpg" border="0" usemap="#_chat_renderer_8h_a4e32ec37bc35fb42ec98d594a8265c89_icgraph" alt=""/></div>
<map name="_chat_renderer_8h_a4e32ec37bc35fb42ec98d594a8265c89_icgraph" id="_chat_renderer_8h_a4e32ec37bc35fb42ec98d594a8265c89_icgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72" title="Strips yahoo text formatting from a string." alt="" coords="206,5,365,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a61619b0d85f26ed36bd14c4fefbc4f72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string RendererText_StripText </td>
          <td>(</td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Strips yahoo text formatting from a string. </p>
<p>This function, for ease, actually transforms Yahoo formats into orderly HTML, then strips HTML from the text. Currently, only Windows (with _WIN32 defined) is supported by this function. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>A string object with yahoo formatting to be stripped </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">string</td><td>Success: string object with formatting stripped from it. </td></tr>
    <tr><td class="paramname">s</td><td>Failure: string object containing the original string (if platform unsupported) </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_a61619b0d85f26ed36bd14c4fefbc4f72_cgraph.jpg" border="0" usemap="#_chat_renderer_8h_a61619b0d85f26ed36bd14c4fefbc4f72_cgraph" alt=""/></div>
<map name="_chat_renderer_8h_a61619b0d85f26ed36bd14c4fefbc4f72_cgraph" id="_chat_renderer_8h_a61619b0d85f26ed36bd14c4fefbc4f72_cgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#af06d96fd37355e90b1442a086ed24aec" title="Create a RendererText object from a string for manipulation by ChatRenderer." alt="" coords="256,5,400,32"/><area shape="rect" id="node5" href="_chat_renderer_8h.html#aa832b4d5bec023fd420aada507373979" title="Render yahoo text formatting into HTML format." alt="" coords="233,56,423,83"/><area shape="rect" id="node7" href="_chat_renderer_8h.html#a16e70a5af203d8270f617c4e550f71cf" title="Strip HTML formatting leaving plain text." alt="" coords="213,107,443,133"/><area shape="rect" id="node9" href="_chat_renderer_8h.html#a4e32ec37bc35fb42ec98d594a8265c89" title="Retrieve a C string from a RendererText object." alt="" coords="252,157,404,184"/><area shape="rect" id="node11" href="_chat_renderer_8h.html#aa0eda33c01059b56b84add0060d424e7" title="Free a RendererText object from memory." alt="" coords="251,208,405,235"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa832b4d5bec023fd420aada507373979"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">DLLIMPORT int RendererText_YFormatHTML </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>pRTextVoid</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Render yahoo text formatting into HTML format. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pRTextVoid</td><td>pointer to a RendererText object in heap memory. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values:</dt><dd>
  <table class="retval">
    <tr><td class="paramname">1</td><td>Success: RendererText contents were successfully rendered as HTML. </td></tr>
    <tr><td class="paramname">0</td><td>Failure: pRTextVoid was invalid. </td></tr>
  </table>
  </dd>
</dl>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="_chat_renderer_8h_aa832b4d5bec023fd420aada507373979_icgraph.jpg" border="0" usemap="#_chat_renderer_8h_aa832b4d5bec023fd420aada507373979_icgraph" alt=""/></div>
<map name="_chat_renderer_8h_aa832b4d5bec023fd420aada507373979_icgraph" id="_chat_renderer_8h_aa832b4d5bec023fd420aada507373979_icgraph">
<area shape="rect" id="node3" href="_chat_renderer_8h.html#a61619b0d85f26ed36bd14c4fefbc4f72" title="Strips yahoo text formatting from a string." alt="" coords="246,5,405,32"/></map>
</div>
</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_chat_renderer_8h.html">ChatRenderer.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 </li>
  </ul>
</div>
</body>
</html>
